package com.isoft.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 航班资源分配表-存储物理资源分配信息
 * @TableName FLIGHT_RESOURCES
 */
@TableName(value ="FLIGHT_RESOURCES")
@Data
public class FlightResources implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Long RESOURCE_ID;

    /**
     *
     */
    private Long FLIGHT_ID;

    /**
     * 资源类型:GATE=登机门/BELT=行李转盘/CHUTE=滑槽/COUNTER=值机柜台/STAND=机位
     */
    private String RES_TYPE;

    /**
     * 资源序号(1-99标识多个同类资源)
     */
    private Integer RES_NO;

    /**
     * 资源编号(实际物理标识如A01)
     */
    private String RES_CODE;

    /**
     * 资源唯一标识符(系统内部ID)
     */
    private String RES_ID;

    /**
     * 资源属性:2401=国际/2402=地区/2403=国内/2404=混合
     */
    private String RES_ATTR;

    /**
     * 预计开始使用时间
     */
    private Date ESTR;

    /**
     * 预计结束使用时间
     */
    private Date EEND;

    /**
     * 实际开始使用时间
     */
    private Date RSTR;

    /**
     * 实际结束使用时间
     */
    private Date REND;

    /**
     * 资源所属航站楼编号
     */
    private String BTSC;

    /**
     * 行李转盘到达出口号
     */
    private String EXNO;

    /**
     * 值机柜台所属值机岛编号
     */
    private String CCAR;

    /**
     * 柜台类型(F=普通等)
     */
    private String TYPE;

    /**
     * 机位当前停放标志(Y=当前停放)
     */
    private String CSSI;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FlightResources other = (FlightResources) that;
        return (this.getRESOURCE_ID() == null ? other.getRESOURCE_ID() == null : this.getRESOURCE_ID().equals(other.getRESOURCE_ID()))
                && (this.getFLIGHT_ID() == null ? other.getFLIGHT_ID() == null : this.getFLIGHT_ID().equals(other.getFLIGHT_ID()))
                && (this.getRES_TYPE() == null ? other.getRES_TYPE() == null : this.getRES_TYPE().equals(other.getRES_TYPE()))
                && (this.getRES_NO() == null ? other.getRES_NO() == null : this.getRES_NO().equals(other.getRES_NO()))
                && (this.getRES_CODE() == null ? other.getRES_CODE() == null : this.getRES_CODE().equals(other.getRES_CODE()))
                && (this.getRES_ID() == null ? other.getRES_ID() == null : this.getRES_ID().equals(other.getRES_ID()))
                && (this.getRES_ATTR() == null ? other.getRES_ATTR() == null : this.getRES_ATTR().equals(other.getRES_ATTR()))
                && (this.getESTR() == null ? other.getESTR() == null : this.getESTR().equals(other.getESTR()))
                && (this.getEEND() == null ? other.getEEND() == null : this.getEEND().equals(other.getEEND()))
                && (this.getRSTR() == null ? other.getRSTR() == null : this.getRSTR().equals(other.getRSTR()))
                && (this.getREND() == null ? other.getREND() == null : this.getREND().equals(other.getREND()))
                && (this.getBTSC() == null ? other.getBTSC() == null : this.getBTSC().equals(other.getBTSC()))
                && (this.getEXNO() == null ? other.getEXNO() == null : this.getEXNO().equals(other.getEXNO()))
                && (this.getCCAR() == null ? other.getCCAR() == null : this.getCCAR().equals(other.getCCAR()))
                && (this.getTYPE() == null ? other.getTYPE() == null : this.getTYPE().equals(other.getTYPE()))
                && (this.getCSSI() == null ? other.getCSSI() == null : this.getCSSI().equals(other.getCSSI()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRESOURCE_ID() == null) ? 0 : getRESOURCE_ID().hashCode());
        result = prime * result + ((getFLIGHT_ID() == null) ? 0 : getFLIGHT_ID().hashCode());
        result = prime * result + ((getRES_TYPE() == null) ? 0 : getRES_TYPE().hashCode());
        result = prime * result + ((getRES_NO() == null) ? 0 : getRES_NO().hashCode());
        result = prime * result + ((getRES_CODE() == null) ? 0 : getRES_CODE().hashCode());
        result = prime * result + ((getRES_ID() == null) ? 0 : getRES_ID().hashCode());
        result = prime * result + ((getRES_ATTR() == null) ? 0 : getRES_ATTR().hashCode());
        result = prime * result + ((getESTR() == null) ? 0 : getESTR().hashCode());
        result = prime * result + ((getEEND() == null) ? 0 : getEEND().hashCode());
        result = prime * result + ((getRSTR() == null) ? 0 : getRSTR().hashCode());
        result = prime * result + ((getREND() == null) ? 0 : getREND().hashCode());
        result = prime * result + ((getBTSC() == null) ? 0 : getBTSC().hashCode());
        result = prime * result + ((getEXNO() == null) ? 0 : getEXNO().hashCode());
        result = prime * result + ((getCCAR() == null) ? 0 : getCCAR().hashCode());
        result = prime * result + ((getTYPE() == null) ? 0 : getTYPE().hashCode());
        result = prime * result + ((getCSSI() == null) ? 0 : getCSSI().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", RESOURCE_ID=").append(RESOURCE_ID);
        sb.append(", FLIGHT_ID=").append(FLIGHT_ID);
        sb.append(", RES_TYPE=").append(RES_TYPE);
        sb.append(", RES_NO=").append(RES_NO);
        sb.append(", RES_CODE=").append(RES_CODE);
        sb.append(", RES_ID=").append(RES_ID);
        sb.append(", RES_ATTR=").append(RES_ATTR);
        sb.append(", ESTR=").append(ESTR);
        sb.append(", EEND=").append(EEND);
        sb.append(", RSTR=").append(RSTR);
        sb.append(", REND=").append(REND);
        sb.append(", BTSC=").append(BTSC);
        sb.append(", EXNO=").append(EXNO);
        sb.append(", CCAR=").append(CCAR);
        sb.append(", TYPE=").append(TYPE);
        sb.append(", CSSI=").append(CSSI);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}